home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung 2 / Power-Programmierung CD 2 (Tewi)(1994).iso / gnu / gnulib / ghostscr / ghost.mak < prev    next >
Encoding:
Text File  |  1991-02-04  |  10.2 KB  |  294 lines

  1. #    Copyright (C) 1989, 1990, 1991 Aladdin Enterprises.  All rights reserved.
  2. #    Distributed by Free Software Foundation, Inc.
  3. #
  4. # This file is part of Ghostscript.
  5. #
  6. # Ghostscript is distributed in the hope that it will be useful, but
  7. # WITHOUT ANY WARRANTY.  No author or distributor accepts responsibility
  8. # to anyone for the consequences of using it or for whether it serves any
  9. # particular purpose or works at all, unless he says so in writing.  Refer
  10. # to the Ghostscript General Public License for full details.
  11. #
  12. # Everyone is granted permission to copy, modify and redistribute
  13. # Ghostscript, but only under the conditions described in the Ghostscript
  14. # General Public License.  A copy of this license is supposed to have been
  15. # given to you along with Ghostscript so you can know your rights and
  16. # responsibilities.  It should be in a file named COPYING.  Among other
  17. # things, the copyright notice and this notice must be preserved on all
  18. # copies.
  19.  
  20. # Generic makefile for Ghostscript.
  21. # The platform-specific makefiles 'include' this file.
  22. # They define the following symbols:
  23. #    GS_LIB_DEFAULT - the default directory/ies for searching for the
  24. #        initialization and font files at run time.
  25. #    Q - the string that causes the shell to pass a " to a program
  26. #        (" on MS-DOS, \" on Unix).
  27. #    XE - the extension for executable files (e.g., null or .exe).
  28. #    OBJ - the extension for relocatable object files (e.g., o or obj).
  29. #    CCA - the ANSI C invocation for normal compilation.
  30. #    CCNA - the non-ANSI C invocation for files that on some platforms
  31. #        include in-line assembly code or other non-standard
  32. #        constructs.  Currently this is needed on every file that
  33. #        includes sstorei.h, and a few files that use Turbo C
  34. #        "short pointer" constructs.
  35. #    CCINT - the C invocation for compiling the main interpreter module,
  36. #        normally the same as CCNA: this is needed because the
  37. #        Borland compiler generates *worse* code for this module
  38. #        (but only this module) when optimization (-O) is turned on.
  39. #    AK - if source files must be converted from ANSI to K&R syntax,
  40. #        this is ansi2knr$(XE); if not, it is null.
  41. #    DS - the directory separator (/ or \).
  42. # The platform-specific makefiles must also include rules for creating
  43. #   ansi2knr$(XE) and genarch$(XE) from the corresponding .c files,
  44. #   and for making arch.h by executing genarch$(XE).  (This
  45. #   shouldn't really be necessary, but Turbo C and Unix C treat the -o
  46. #   switch slightly differently (Turbo C requires no following space,
  47. #   Unix C requires a following space), and I haven't found a way to capture
  48. #   the difference in a macro; also, Unix requires ./ because . may not be
  49. #   in the search path, whereas MS-DOS always looks in the current
  50. #   directory first.)
  51.  
  52. default: gs$(XE)
  53.  
  54. test: gt$(XE)
  55.  
  56. clean:
  57.     rm -f *.$(OBJ) *.a core gmon.out
  58.     rm -f *.dev gdevs.h gdevs.tl
  59.     rm -f t _temp_* _temp_*.* libc*.tl *.map *.sym
  60.     rm -f ansi2knr$(XE) genarch$(XE) arch.h gs$(XE)
  61.  
  62. # Note: Unix uses malloc.h and memory.h;
  63. # Turbo C uses alloc.h, stdlib.h, and mem.h.
  64. # 4.2bsd uses strings.h; other systems use string.h.
  65. # gcc on VMS doesn't have a math.h.
  66. # We handle this by using local include files called
  67. # malloc_.h, math_.h, memory_.h, and string_.h
  68. # that perform appropriate indirection.
  69.  
  70. # Auxiliary programs
  71.  
  72. arch.h: genarch$(XE)
  73.     .$(DS)genarch
  74.  
  75. # -------------------------------- Library -------------------------------- #
  76.  
  77. GX=$(AK) std.h gx.h
  78. GXERR=$(GX) gserrors.h
  79.  
  80. ###### High-level facilities
  81.  
  82. gschar.$(OBJ): gschar.c $(GXERR) \
  83.   gxfixed.h gxarith.h gxmatrix.h gzdevice.h gxdevmem.h gxfont.h gxchar.h gstype1.h gzpath.h gzcolor.h gzstate.h
  84.  
  85. gscolor.$(OBJ): gscolor.c $(GXERR) \
  86.   gxfixed.h gxmatrix.h gxdevice.h gzstate.h gzcolor.h gzht.h
  87.  
  88. gscoord.$(OBJ): gscoord.c $(GXERR) \
  89.   gxfixed.h gxmatrix.h gzdevice.h gzstate.h gscoord.h
  90.  
  91. gsdevice.$(OBJ): gsdevice.c $(GXERR) \
  92.   gxfixed.h gxmatrix.h gxbitmap.h gxdevmem.h gzstate.h gzdevice.h
  93.  
  94. gsfile.$(OBJ): gsfile.c $(GXERR) \
  95.   gsmatrix.h gxdevice.h gxdevmem.h
  96.  
  97. gsfont.$(OBJ): gsfont.c $(GXERR) \
  98.   gxdevice.h gxfixed.h gxmatrix.h gxfont.h gxfdir.h gzstate.h
  99.  
  100. gsimage.$(OBJ): gsimage.c $(GXERR) \
  101.   arch.h gxfixed.h gxarith.h gxmatrix.h gspaint.h gzcolor.h gzdevice.h gzpath.h gzstate.h gximage.h
  102.  
  103. gsim2out.$(OBJ): gsim2out.c $(GXERR) \
  104.   gsstate.h gsmatrix.h gscoord.h gxfixed.h gxtype1.h
  105.  
  106. gsline.$(OBJ): gsline.c $(GXERR) \
  107.   gxfixed.h gxmatrix.h gzstate.h gzline.h
  108.  
  109. gsmatrix.$(OBJ): gsmatrix.c $(GXERR) \
  110.   gxfixed.h gxarith.h gxmatrix.h
  111.  
  112. gsmisc.$(OBJ): gsmisc.c $(GX)
  113.  
  114. gspaint.$(OBJ): gspaint.c $(GX) \
  115.   gxfixed.h gxmatrix.h gspaint.h gzpath.h gzstate.h gzdevice.h gximage.h
  116.  
  117. gspath.$(OBJ): gspath.c $(GXERR) \
  118.   gxfixed.h gxmatrix.h gxpath.h gzstate.h
  119.  
  120. gspath2.$(OBJ): gspath2.c $(GXERR) \
  121.   gspath.h gxfixed.h gxmatrix.h gzstate.h gzpath.h gzdevice.h
  122.  
  123. gsstate.$(OBJ): gsstate.c $(GXERR) \
  124.   gxfixed.h gxmatrix.h gzstate.h gzcolor.h gzdevice.h gzht.h gzline.h gzpath.h
  125.  
  126. gstype1.$(OBJ): gstype1.c $(GXERR) \
  127.   gxarith.h gxfixed.h gxmatrix.h gxchar.h gxdevmem.h gxtype1.h gxfont1.h gzstate.h gzdevice.h gzpath.h
  128.  
  129. ###### Low-level facilities
  130.  
  131. gxcache.$(OBJ): gxcache.c $(GX) \
  132.   gserrors.h gxfixed.h gxmatrix.h gspaint.h gzdevice.h gzcolor.h gxdevmem.h gxfont.h gxfdir.h gxchar.h gzstate.h gzpath.h
  133.  
  134. gxcolor.$(OBJ): gxcolor.c $(GX) \
  135.   gxfixed.h gxmatrix.h gxdevice.h gzcolor.h gzht.h
  136.  
  137. gxdither.$(OBJ): gxdither.c $(GX) \
  138.   gxfixed.h gxmatrix.h gzstate.h gzdevice.h gzcolor.h gzht.h
  139.  
  140. gxdraw.$(OBJ): gxdraw.c $(GX) \
  141.   gxfixed.h gxmatrix.h gxbitmap.h gzcolor.h gzdevice.h gzstate.h
  142.  
  143. gxfill.$(OBJ): gxfill.c $(GXERR) \
  144.   gxfixed.h gxmatrix.h gxdevice.h gzcolor.h gzpath.h gzstate.h
  145.  
  146. gxht.$(OBJ): gxht.c $(GXERR) \
  147.   gxfixed.h gxmatrix.h gxbitmap.h gzstate.h gzcolor.h gzdevice.h gzht.h
  148.  
  149. gxpath.$(OBJ): gxpath.c $(GXERR) \
  150.   gxfixed.h gzpath.h
  151.  
  152. gxpath2.$(OBJ): gxpath2.c $(GXERR) \
  153.   gxfixed.h gxarith.h gzpath.h
  154.  
  155. gxstroke.$(OBJ): gxstroke.c $(GXERR) \
  156.   gxfixed.h gxarith.h gxmatrix.h gzstate.h gzcolor.h gzdevice.h gzline.h gzpath.h
  157.  
  158. ###### The "memory" device
  159.  
  160. gdevmem.$(OBJ): gdevmem.c $(AK) \
  161.   gs.h arch.h gxbitmap.h gsmatrix.h gxdevice.h gxdevmem.h
  162.     $(CCNA) gdevmem.c
  163.  
  164. ###### Files dependent on the set of installed devices.
  165. ###### Generating gdevs.h also generates gdevs.tl.
  166.  
  167. gdevs.h: gdevs.mak $(MAKEFILE) makefile
  168.     .$(DS)gsconfig $(DEVICES)
  169.  
  170. gdevs.$(OBJ): gdevs.c $(AK) gdevs.h
  171.  
  172. ###### On Unix, we pre-link all of the library except the back end.
  173. ###### On MS-DOS, we have to do the whole thing at once.
  174.  
  175. LIB=gschar.$(OBJ) gscolor.$(OBJ) gscoord.$(OBJ) gsdevice.$(OBJ) \
  176.  gsfile.$(OBJ) gsfont.$(OBJ) gsimage.$(OBJ) gsim2out.$(OBJ) \
  177.  gsline.$(OBJ) gsmatrix.$(OBJ) gsmisc.$(OBJ) \
  178.  gspaint.$(OBJ) gspath.$(OBJ) gspath2.$(OBJ) gsstate.$(OBJ) gstype1.$(OBJ) \
  179.  gxcache.$(OBJ) gxcolor.$(OBJ) gxdither.$(OBJ) gxdraw.$(OBJ) gxfill.$(OBJ) \
  180.  gxht.$(OBJ) gxpath.$(OBJ) gxpath2.$(OBJ) gxstroke.$(OBJ) \
  181.  gdevmem.$(OBJ) gdevs.$(OBJ)
  182.  
  183. # ------------------------------ Interpreter ------------------------------ #
  184.  
  185. ###### Utilities
  186.  
  187. GH=$(AK) ghost.h
  188.  
  189. ialloc.$(OBJ): ialloc.c $(AK) std.h alloc.h
  190.     $(CCNA) ialloc.c
  191.  
  192. idebug.$(OBJ): idebug.c $(GH) name.h
  193.  
  194. idict.$(OBJ): idict.c $(GH) alloc.h errors.h name.h store.h dict.h
  195.  
  196. iinit.$(OBJ): iinit.c $(GH) dict.h oper.h store.h
  197.  
  198. iname.$(OBJ): iname.c $(GH) alloc.h errors.h name.h store.h
  199.  
  200. iscan.$(OBJ): iscan.c $(GH) arch.h alloc.h dict.h errors.h name.h store.h stream.h scanchar.h
  201.  
  202. iutil.$(OBJ): iutil.c $(GH) errors.h alloc.h oper.h store.h gsmatrix.h gxdevice.h gzcolor.h
  203.  
  204. stream.$(OBJ): stream.c $(AK) std.h stream.h scanchar.h gxfixed.h gstype1.h
  205.  
  206. ###### Non-graphics operators
  207.  
  208. OP=$(GH) errors.h oper.h
  209.  
  210. zarith.$(OBJ): zarith.c $(OP) store.h
  211.  
  212. zarray.$(OBJ): zarray.c $(OP) alloc.h store.h sstorei.h
  213.     $(CCNA) zarray.c
  214.  
  215. zcontrol.$(OBJ): zcontrol.c $(OP) estack.h store.h sstorei.h
  216.     $(CCNA) zcontrol.c
  217.  
  218. zdict.$(OBJ): zdict.c $(OP) dict.h store.h
  219.  
  220. zfile.$(OBJ): zfile.c $(OP) alloc.h stream.h store.h gsmatrix.h gxdevice.h gxdevmem.h
  221.  
  222. zgeneric.$(OBJ): zgeneric.c $(OP) dict.h estack.h store.h
  223.  
  224. zmath.$(OBJ): zmath.c $(OP) store.h
  225.  
  226. zmisc.$(OBJ): zmisc.c $(OP) alloc.h dict.h store.h gstype1.h gxfixed.h
  227.  
  228. zpacked.$(OBJ): zpacked.c $(OP) store.h
  229.  
  230. zrelbit.$(OBJ): zrelbit.c $(OP) store.h sstorei.h dict.h
  231.     $(CCNA) zrelbit.c
  232.  
  233. zstack.$(OBJ): zstack.c $(OP) store.h sstorei.h
  234.     $(CCNA) zstack.c
  235.  
  236. zstring.$(OBJ): zstring.c $(OP) alloc.h store.h stream.h
  237.  
  238. ztype.$(OBJ): ztype.c $(OP) dict.h name.h stream.h store.h
  239.  
  240. zvmem.$(OBJ): zvmem.c $(OP) alloc.h state.h store.h gsmatrix.h gsstate.h
  241.  
  242. ###### Graphics operators
  243.  
  244. zchar.$(OBJ): zchar.c $(OP) gxmatrix.h gschar.h gstype1.h gxdevice.h gxfixed.h gxfont.h gxfont1.h gzpath.h gzstate.h alloc.h dict.h font.h estack.h state.h store.h
  245.  
  246. zcolor.$(OBJ): zcolor.c $(OP) alloc.h gsmatrix.h gsstate.h state.h store.h
  247.  
  248. zdevice.$(OBJ): zdevice.c $(OP) alloc.h state.h gsmatrix.h gsstate.h gxdevice.h store.h
  249.  
  250. zfont.$(OBJ): zfont.c $(OP) gsmatrix.h gxdevice.h gxfont.h gxfont1.h alloc.h font.h dict.h name.h state.h store.h
  251.  
  252. zgstate.$(OBJ): zgstate.c $(OP) alloc.h gsmatrix.h gsstate.h state.h store.h
  253.  
  254. zht.$(OBJ): zht.c $(OP) alloc.h estack.h gsmatrix.h gsstate.h state.h store.h
  255.  
  256. zmatrix.$(OBJ): zmatrix.c $(OP) gsmatrix.h state.h gscoord.h store.h
  257.  
  258. zpaint.$(OBJ): zpaint.c $(OP) alloc.h estack.h gsmatrix.h gspaint.h state.h store.h
  259.  
  260. zpath.$(OBJ): zpath.c $(OP) gsmatrix.h gspath.h state.h store.h
  261.  
  262. zpath2.$(OBJ): zpath2.c $(OP) alloc.h estack.h gspath.h state.h store.h
  263.  
  264. ###### Linking
  265.  
  266. INT=ialloc.$(OBJ) idebug.$(OBJ) idict.$(OBJ) iinit.$(OBJ) iname.$(OBJ) \
  267.  interp.$(OBJ) iscan.$(OBJ) iutil.$(OBJ) stream.$(OBJ) \
  268.  zarith.$(OBJ) zarray.$(OBJ) zcontrol.$(OBJ) zdict.$(OBJ) zfile.$(OBJ) \
  269.  zgeneric.$(OBJ) zmath.$(OBJ) zmisc.$(OBJ) zpacked.$(OBJ) zrelbit.$(OBJ) \
  270.  zstack.$(OBJ) zstring.$(OBJ) ztype.$(OBJ) zvmem.$(OBJ) \
  271.  zchar.$(OBJ) zcolor.$(OBJ) zfont.$(OBJ) zdevice.$(OBJ) zgstate.$(OBJ) \
  272.  zht.$(OBJ) zmatrix.$(OBJ) zpaint.$(OBJ) zpath.$(OBJ) zpath2.$(OBJ)
  273.  
  274. # ----------------------------- Main program ------------------------------ #
  275.  
  276. # Utilities shared between platforms
  277.  
  278. gsmain.$(OBJ): gsmain.c $(GX) \
  279.   gsmatrix.h gxdevice.h
  280.  
  281. # Library test program driver
  282.  
  283. gt.$(OBJ): gt.c $(GX) \
  284.   gsmatrix.h gsstate.h gscoord.h gspaint.h gspath.h gxdevice.h
  285.  
  286. # Interpreter main program
  287.  
  288. interp.$(OBJ): interp.c $(GH) \
  289.   errors.h name.h dict.h oper.h store.h sstorei.h stream.h
  290.     $(CCINT) interp.c
  291.  
  292. gs.$(OBJ): gs.c $(GH) alloc.h store.h stream.h $(MAKEFILE)
  293.     $(CCA) -DGS_LIB_DEFAULT=$(Q)$(GS_LIB_DEFAULT)$(Q) gs.c
  294.